﻿@model TopModel

<div class="navbar ">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="~/">성공회대학교 지식저장소</a>
            <div class="nav-collapse collapse">
                <ul class="nav">
                    <li><a href="~/">홈</a></li>
                    <li><a href="@Url.BookmarkList()">책갈피</a></li>
                    <li><a href="@Url.SearchMain()">검색</a></li>
                    <li><a href="@Url.SubjectTreeView()">주제 목록</a></li>
                    <li><a href="@Url.SearchNew()">최근 글</a></li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown">게시판<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            @foreach(var 게시판 in Model.게시판목록) {
                                <li><a href="@Url.BbsArticleListInit(게시판.ID)">@게시판.제목</a></li>
                            }                           
                            @if (Model.관리자) { 
                                <li class="divider"></li>
                                <li><a onclick="새게시판생성()">새 게시판 생성</a></li>
                            }
                        </ul>
                    </li>
                    <li class="dropdown">
                        <a class="dropdown-toggle" data-toggle="dropdown" @(Model.관리자 ? "" : "disabled") >관리<b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="@Url.ImageClean()">불필요한 이미지 삭제</a></li>
                            <li><a href="@Url.FileClean()">불필요한 첨부파일 삭제</a></li>
                            <li><a href="@Url.SubjectCalcTitle()">주제 총제목 갱신</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav pull-right">
                    <li><span class="navbar-text">@Model.사용자이름</span></li>
                    <li>
                        @if (Model.로그인상태)
                        {
                            <a href="@Url.UserLogout()">로그아웃</a>
                        }
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>
